#ifndef QUEUE_H
#define QUEUE_H
#include "value.h"

typedef struct Queue
{
    ObjectHeader;
    TValue *array;
    u_int begin;
    u_int end;
    u_int length;
    u_int size;
} Queue;

void Queue_Init(Queue *self, u_int size);
void Queue_Push(Queue *self, TValue value);
TValue Queue_Pop(Queue *self);
void Queue_Shift(Queue *self, TValue value);
TValue Queue_UnShift(Queue *self);
void Queue_Set(Queue *self, _int index, TValue value);
TValue Queue_Get(Queue *self, _int index);
void Queue_Insert(Queue *self, _int index, TValue value);
TValue Queue_Remove(Queue *self, _int index);
void Queue_Clear(Queue *self);

void Delete_Queue(Object *self);

Queue *Queue_New(Line *line, u_int size);

#endif